home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / ma22#2.zip / EXAMPLE1.65C < prev    next >
Text File  |  1991-08-21  |  1KB  |  58 lines

  1. *
  2. * Sample source file for the Rockwell 65C02
  3. *
  4. * (this program does not do anything, it is only an example)
  5. *
  6.     title   Sample source file
  7. *
  8. * Definitions
  9. *
  10. cr      equ     $0d     ;carriage return
  11. lf      equ     10      ;line feed
  12. RAM:    equ     $2000   ;memory start
  13. ppi0    equ     $8000   ;ppi 0
  14. crppi0  equ     ppi0+1  ;control register
  15. srppi0  equ     ppi0+2  ;status register
  16. flag    equ     123     ;flag bit
  17. offset  set     0
  18. *
  19. * Variables
  20. *
  21.     org     RAM     ;variables
  22. key     reserve 16      ;key buffer
  23. table   reserve 2+3*$10 ;address table
  24. loop1:
  25. offset  set     9
  26. *
  27. * Program
  28. *
  29.     lda     #'*'
  30.     ldx     $44,y
  31.     cmp     (35,x)
  32.     cmp     (22),y
  33.     and     ($44)
  34.     ora     flag
  35.     lda     $1035
  36.     lda     messg1+offset
  37.     ora     #flag
  38.     ldx     #10
  39.     jsr     delay
  40.     bbr     1,$EE,loop1
  41.     phx
  42.     plx
  43.     rmb     6,$63
  44.     bra     loop1
  45.     jmp     ($1234,x)
  46. *
  47. * Delay routine
  48. *
  49. delay:  dex
  50.     rts
  51. *
  52. * Dummy data
  53. *
  54. routines word $1234,$f800,0 ;routine addresses
  55. messg1  byte    cr,lf,'String no 1.',0
  56. messg2  byte    cr,lf,lf,'Press a key.',0
  57.     end
  58.